import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import cart from "../views/cart.vue";
import category from "../views/category.vue";
import mine from "../views/mine.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
    meta: {
      isShow: true,
    },
  },
  {
    path: "/cart",
    name: "cart",
    component: cart,
    meta: {
      isShow: true,
    },
  },
  {
    path: "/category",
    name: "category",
    component: category,
    meta: {
      isShow: true,
    },
  },
  {
    path: "/mine",
    name: "mine",
    component: mine,
    meta: {
      isShow: true,
    },
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
